import request from '@/utils/request'

export function getIndustrialList(query) {
  return request({
    url: '/knowledge/industrial/getList',
    method: 'post',
    data: query
  })
}

export function getIndustrialDetail(id) {
  return request({
    url: '/knowledge/industrial/getDetail',
    method: 'post',
    data: id
  })
}
export function changeStatusByIndustrialID(id) {
  return request({
    url: '/knowledge/industrial/change-status',
    method: 'post',
    data: id
  })
}

export function saveIndustrial(formdata) {
  return request({
    url: '/knowledge/industrial/save',
    method: 'post',
    data: formdata
  })
}

export function deleteIndustrialByID(id) {
  return request({
    url: '/knowledge/industrial/delete',
    method: 'post',
    data: id
  })
}
export function removeIndustrialByID(id) {
  return request({
    url: '/knowledge/industrial/remove',
    method: 'post',
    data: id
  })
}

export function getIndustrialUsable(query) {
  if(query != undefined){
    query = JSON.parse(JSON.stringify(query))
  }
  return request({
    url: '/knowledge/industrial/getAvailable',
    method: 'post',
    data: query
  })
}
export function importIndustrial(data){
  return request({
    url: '/knowledge/industrial/import',
    method: 'post',
    data: data
  })
}